﻿using System;

namespace LX.Core.Auth
{
    public interface IAuthorizeManager
    {
        /// <summary>
        /// 使用继承授权
        /// </summary>
        /// <param name="principal"></param>
        /// <param name="operate"></param>
        void InheritAuthorize(IPrincipal principal, String operate);

        /// <summary>
        /// 取消授权
        /// </summary>
        void Deauthorize(IPrincipal principal, String operate);

        /// <summary>
        /// 授权
        /// </summary>
        void Authorize(IPrincipal principal, String operate);

        /// <summary>
        /// 是否能操作
        /// </summary>
        /// <param name="principal">安全主体</param>
        /// <param name="operate">操作</param>
        bool CanOperate(IPrincipal principal, String operate);


    }
}
